﻿using System;
using System.Data;
using System.Data.Common;
using Liger.Common;
using Liger.Data;

namespace EasyFMS.Model
{

	/// <summary>
	/// 实体类cCost
	/// </summary>
	[Serializable]
	public class cCost : Entity 
	{ 
		 public cCost() 
            : base("cCost") 
        { 

        }


		#region Model
		private int _UID;
		private int? _BillID;
		private int? _SeqNO;
		private int? _Status;
		private string _FinancyYear;
		private string _FinancyMonth;
		private string _SupplyCode;
		private string _SupplyName;
		private string _FeeType;
		private string _Price;
		private string _Qty;
		private string _Currency;
		private string _Exchange;
		private string _Cost;
		private string _CostCNY;
		private int? _PayType;
		private string _AccountNo;
		private string _CheckNo;
		private string _CostPay;
		private string _CostNo;
		private string _Cost2;
		private string _InTax;
		private bool? _IsCollate;
		private int? _UserCollateID;
		private string _CollateDate;
		private string _CollateNo;
		private bool? _IsConfirm;
		private int? _UserConfirmID;
		private string _ConfirmDate;
		private bool? _IsPay;
		private int? _UserPayID;
		private string _PayDate;
		private string _Note;
		private bool? _IsSelect;
		private int? _UserCreateID;
		private string _CreateDate;
		private int? _UserModifyID;
		private string _ModifyDate;
	 
		/// <summary>
		/// 
		/// </summary>
		public int UID
		{
			get{ return _UID; }
			set
			{
				this.OnPropertyValueChange(_.UID,_UID,value);
				this._UID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? BillID
		{
			get{ return _BillID; }
			set
			{
				this.OnPropertyValueChange(_.BillID,_BillID,value);
				this._BillID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? SeqNO
		{
			get{ return _SeqNO; }
			set
			{
				this.OnPropertyValueChange(_.SeqNO,_SeqNO,value);
				this._SeqNO = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? Status
		{
			get{ return _Status; }
			set
			{
				this.OnPropertyValueChange(_.Status,_Status,value);
				this._Status = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FinancyYear
		{
			get{ return _FinancyYear; }
			set
			{
				this.OnPropertyValueChange(_.FinancyYear,_FinancyYear,value);
				this._FinancyYear = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FinancyMonth
		{
			get{ return _FinancyMonth; }
			set
			{
				this.OnPropertyValueChange(_.FinancyMonth,_FinancyMonth,value);
				this._FinancyMonth = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SupplyCode
		{
			get{ return _SupplyCode; }
			set
			{
				this.OnPropertyValueChange(_.SupplyCode,_SupplyCode,value);
				this._SupplyCode = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string SupplyName
		{
			get{ return _SupplyName; }
			set
			{
				this.OnPropertyValueChange(_.SupplyName,_SupplyName,value);
				this._SupplyName = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string FeeType
		{
			get{ return _FeeType; }
			set
			{
				this.OnPropertyValueChange(_.FeeType,_FeeType,value);
				this._FeeType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Price
		{
			get{ return _Price; }
			set
			{
				this.OnPropertyValueChange(_.Price,_Price,value);
				this._Price = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Qty
		{
			get{ return _Qty; }
			set
			{
				this.OnPropertyValueChange(_.Qty,_Qty,value);
				this._Qty = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Currency
		{
			get{ return _Currency; }
			set
			{
				this.OnPropertyValueChange(_.Currency,_Currency,value);
				this._Currency = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Exchange
		{
			get{ return _Exchange; }
			set
			{
				this.OnPropertyValueChange(_.Exchange,_Exchange,value);
				this._Exchange = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Cost
		{
			get{ return _Cost; }
			set
			{
				this.OnPropertyValueChange(_.Cost,_Cost,value);
				this._Cost = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CostCNY
		{
			get{ return _CostCNY; }
			set
			{
				this.OnPropertyValueChange(_.CostCNY,_CostCNY,value);
				this._CostCNY = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? PayType
		{
			get{ return _PayType; }
			set
			{
				this.OnPropertyValueChange(_.PayType,_PayType,value);
				this._PayType = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string AccountNo
		{
			get{ return _AccountNo; }
			set
			{
				this.OnPropertyValueChange(_.AccountNo,_AccountNo,value);
				this._AccountNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CheckNo
		{
			get{ return _CheckNo; }
			set
			{
				this.OnPropertyValueChange(_.CheckNo,_CheckNo,value);
				this._CheckNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CostPay
		{
			get{ return _CostPay; }
			set
			{
				this.OnPropertyValueChange(_.CostPay,_CostPay,value);
				this._CostPay = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CostNo
		{
			get{ return _CostNo; }
			set
			{
				this.OnPropertyValueChange(_.CostNo,_CostNo,value);
				this._CostNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Cost2
		{
			get{ return _Cost2; }
			set
			{
				this.OnPropertyValueChange(_.Cost2,_Cost2,value);
				this._Cost2 = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string InTax
		{
			get{ return _InTax; }
			set
			{
				this.OnPropertyValueChange(_.InTax,_InTax,value);
				this._InTax = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsCollate
		{
			get{ return _IsCollate; }
			set
			{
				this.OnPropertyValueChange(_.IsCollate,_IsCollate,value);
				this._IsCollate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCollateID
		{
			get{ return _UserCollateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCollateID,_UserCollateID,value);
				this._UserCollateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CollateDate
		{
			get{ return _CollateDate; }
			set
			{
				this.OnPropertyValueChange(_.CollateDate,_CollateDate,value);
				this._CollateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CollateNo
		{
			get{ return _CollateNo; }
			set
			{
				this.OnPropertyValueChange(_.CollateNo,_CollateNo,value);
				this._CollateNo = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsConfirm
		{
			get{ return _IsConfirm; }
			set
			{
				this.OnPropertyValueChange(_.IsConfirm,_IsConfirm,value);
				this._IsConfirm = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserConfirmID
		{
			get{ return _UserConfirmID; }
			set
			{
				this.OnPropertyValueChange(_.UserConfirmID,_UserConfirmID,value);
				this._UserConfirmID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ConfirmDate
		{
			get{ return _ConfirmDate; }
			set
			{
				this.OnPropertyValueChange(_.ConfirmDate,_ConfirmDate,value);
				this._ConfirmDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsPay
		{
			get{ return _IsPay; }
			set
			{
				this.OnPropertyValueChange(_.IsPay,_IsPay,value);
				this._IsPay = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserPayID
		{
			get{ return _UserPayID; }
			set
			{
				this.OnPropertyValueChange(_.UserPayID,_UserPayID,value);
				this._UserPayID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string PayDate
		{
			get{ return _PayDate; }
			set
			{
				this.OnPropertyValueChange(_.PayDate,_PayDate,value);
				this._PayDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string Note
		{
			get{ return _Note; }
			set
			{
				this.OnPropertyValueChange(_.Note,_Note,value);
				this._Note = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public bool? IsSelect
		{
			get{ return _IsSelect; }
			set
			{
				this.OnPropertyValueChange(_.IsSelect,_IsSelect,value);
				this._IsSelect = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserCreateID
		{
			get{ return _UserCreateID; }
			set
			{
				this.OnPropertyValueChange(_.UserCreateID,_UserCreateID,value);
				this._UserCreateID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string CreateDate
		{
			get{ return _CreateDate; }
			set
			{
				this.OnPropertyValueChange(_.CreateDate,_CreateDate,value);
				this._CreateDate = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public int? UserModifyID
		{
			get{ return _UserModifyID; }
			set
			{
				this.OnPropertyValueChange(_.UserModifyID,_UserModifyID,value);
				this._UserModifyID = value;
			}
		}
		/// <summary>
		/// 
		/// </summary>
		public string ModifyDate
		{
			get{ return _ModifyDate; }
			set
			{
				this.OnPropertyValueChange(_.ModifyDate,_ModifyDate,value);
				this._ModifyDate = value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的标识列
		/// </summary>
		public override Field GetIdentityField()
		{
			return _.UID;
		}
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.UID			};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.UID,
				_.BillID,
				_.SeqNO,
				_.Status,
				_.FinancyYear,
				_.FinancyMonth,
				_.SupplyCode,
				_.SupplyName,
				_.FeeType,
				_.Price,
				_.Qty,
				_.Currency,
				_.Exchange,
				_.Cost,
				_.CostCNY,
				_.PayType,
				_.AccountNo,
				_.CheckNo,
				_.CostPay,
				_.CostNo,
				_.Cost2,
				_.InTax,
				_.IsCollate,
				_.UserCollateID,
				_.CollateDate,
				_.CollateNo,
				_.IsConfirm,
				_.UserConfirmID,
				_.ConfirmDate,
				_.IsPay,
				_.UserPayID,
				_.PayDate,
				_.Note,
				_.IsSelect,
				_.UserCreateID,
				_.CreateDate,
				_.UserModifyID,
				_.ModifyDate
			};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				_UID,
				_BillID,
				_SeqNO,
				_Status,
				_FinancyYear,
				_FinancyMonth,
				_SupplyCode,
				_SupplyName,
				_FeeType,
				_Price,
				_Qty,
				_Currency,
				_Exchange,
				_Cost,
				_CostCNY,
				_PayType,
				_AccountNo,
				_CheckNo,
				_CostPay,
				_CostNo,
				_Cost2,
				_InTax,
				_IsCollate,
				_UserCollateID,
				_CollateDate,
				_CollateNo,
				_IsConfirm,
				_UserConfirmID,
				_ConfirmDate,
				_IsPay,
				_UserPayID,
				_PayDate,
				_Note,
				_IsSelect,
				_UserCreateID,
				_CreateDate,
				_UserModifyID,
				_ModifyDate
			};
		} 
		/// <summary>
		/// 设置字段值
		/// </summary>
		public override void SetValue(string fieldName, object value)
        {
            switch (fieldName)
            { 
				case "UID":
                    this._UID = DataHelper.ConvertValue<int>(value);
                    break; 
				case "BillID":
                    this._BillID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "SeqNO":
                    this._SeqNO = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "Status":
                    this._Status = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "FinancyYear":
                    this._FinancyYear = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FinancyMonth":
                    this._FinancyMonth = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SupplyCode":
                    this._SupplyCode = DataHelper.ConvertValue<string>(value);
                    break; 
				case "SupplyName":
                    this._SupplyName = DataHelper.ConvertValue<string>(value);
                    break; 
				case "FeeType":
                    this._FeeType = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Price":
                    this._Price = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Qty":
                    this._Qty = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Currency":
                    this._Currency = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Exchange":
                    this._Exchange = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Cost":
                    this._Cost = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostCNY":
                    this._CostCNY = DataHelper.ConvertValue<string>(value);
                    break; 
				case "PayType":
                    this._PayType = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "AccountNo":
                    this._AccountNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CheckNo":
                    this._CheckNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostPay":
                    this._CostPay = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CostNo":
                    this._CostNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Cost2":
                    this._Cost2 = DataHelper.ConvertValue<string>(value);
                    break; 
				case "InTax":
                    this._InTax = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsCollate":
                    this._IsCollate = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCollateID":
                    this._UserCollateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CollateDate":
                    this._CollateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "CollateNo":
                    this._CollateNo = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsConfirm":
                    this._IsConfirm = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserConfirmID":
                    this._UserConfirmID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ConfirmDate":
                    this._ConfirmDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsPay":
                    this._IsPay = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserPayID":
                    this._UserPayID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "PayDate":
                    this._PayDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "Note":
                    this._Note = DataHelper.ConvertValue<string>(value);
                    break; 
				case "IsSelect":
                    this._IsSelect = DataHelper.ConvertValue<bool?>(value);
                    break; 
				case "UserCreateID":
                    this._UserCreateID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "CreateDate":
                    this._CreateDate = DataHelper.ConvertValue<string>(value);
                    break; 
				case "UserModifyID":
                    this._UserModifyID = DataHelper.ConvertValue<int?>(value);
                    break; 
				case "ModifyDate":
                    this._ModifyDate = DataHelper.ConvertValue<string>(value);
                    break; 
            }
        }
		/// <summary>
		/// 获取字段值
		/// </summary>
        public override object GetValue(string fieldName)
        {
            switch (fieldName)
            { 
				case "UID":
                    return this._UID; 
				case "BillID":
                    return this._BillID; 
				case "SeqNO":
                    return this._SeqNO; 
				case "Status":
                    return this._Status; 
				case "FinancyYear":
                    return this._FinancyYear; 
				case "FinancyMonth":
                    return this._FinancyMonth; 
				case "SupplyCode":
                    return this._SupplyCode; 
				case "SupplyName":
                    return this._SupplyName; 
				case "FeeType":
                    return this._FeeType; 
				case "Price":
                    return this._Price; 
				case "Qty":
                    return this._Qty; 
				case "Currency":
                    return this._Currency; 
				case "Exchange":
                    return this._Exchange; 
				case "Cost":
                    return this._Cost; 
				case "CostCNY":
                    return this._CostCNY; 
				case "PayType":
                    return this._PayType; 
				case "AccountNo":
                    return this._AccountNo; 
				case "CheckNo":
                    return this._CheckNo; 
				case "CostPay":
                    return this._CostPay; 
				case "CostNo":
                    return this._CostNo; 
				case "Cost2":
                    return this._Cost2; 
				case "InTax":
                    return this._InTax; 
				case "IsCollate":
                    return this._IsCollate; 
				case "UserCollateID":
                    return this._UserCollateID; 
				case "CollateDate":
                    return this._CollateDate; 
				case "CollateNo":
                    return this._CollateNo; 
				case "IsConfirm":
                    return this._IsConfirm; 
				case "UserConfirmID":
                    return this._UserConfirmID; 
				case "ConfirmDate":
                    return this._ConfirmDate; 
				case "IsPay":
                    return this._IsPay; 
				case "UserPayID":
                    return this._UserPayID; 
				case "PayDate":
                    return this._PayDate; 
				case "Note":
                    return this._Note; 
				case "IsSelect":
                    return this._IsSelect; 
				case "UserCreateID":
                    return this._UserCreateID; 
				case "CreateDate":
                    return this._CreateDate; 
				case "UserModifyID":
                    return this._UserModifyID; 
				case "ModifyDate":
                    return this._ModifyDate; 
				default :
                    return null;
            } 
        }



		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","cCost");
 
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UID = new Field("UID","cCost","UID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field BillID = new Field("BillID","cCost","BillID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SeqNO = new Field("SeqNO","cCost","SeqNO");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Status = new Field("Status","cCost","Status");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FinancyYear = new Field("FinancyYear","cCost","FinancyYear");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FinancyMonth = new Field("FinancyMonth","cCost","FinancyMonth");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SupplyCode = new Field("SupplyCode","cCost","SupplyCode");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field SupplyName = new Field("SupplyName","cCost","SupplyName");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field FeeType = new Field("FeeType","cCost","FeeType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Price = new Field("Price","cCost","Price");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Qty = new Field("Qty","cCost","Qty");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Currency = new Field("Currency","cCost","Currency");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Exchange = new Field("Exchange","cCost","Exchange");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Cost = new Field("Cost","cCost","Cost");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostCNY = new Field("CostCNY","cCost","CostCNY");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PayType = new Field("PayType","cCost","PayType");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field AccountNo = new Field("AccountNo","cCost","AccountNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CheckNo = new Field("CheckNo","cCost","CheckNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostPay = new Field("CostPay","cCost","CostPay");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CostNo = new Field("CostNo","cCost","CostNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Cost2 = new Field("Cost2","cCost","Cost2");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field InTax = new Field("InTax","cCost","InTax");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsCollate = new Field("IsCollate","cCost","IsCollate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCollateID = new Field("UserCollateID","cCost","UserCollateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CollateDate = new Field("CollateDate","cCost","CollateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CollateNo = new Field("CollateNo","cCost","CollateNo");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsConfirm = new Field("IsConfirm","cCost","IsConfirm");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserConfirmID = new Field("UserConfirmID","cCost","UserConfirmID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ConfirmDate = new Field("ConfirmDate","cCost","ConfirmDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsPay = new Field("IsPay","cCost","IsPay");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserPayID = new Field("UserPayID","cCost","UserPayID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field PayDate = new Field("PayDate","cCost","PayDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field Note = new Field("Note","cCost","Note");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field IsSelect = new Field("IsSelect","cCost","IsSelect");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserCreateID = new Field("UserCreateID","cCost","UserCreateID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field CreateDate = new Field("CreateDate","cCost","CreateDate");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field UserModifyID = new Field("UserModifyID","cCost","UserModifyID");
			/// <summary>
			/// 
			/// </summary>
			public readonly static Field ModifyDate = new Field("ModifyDate","cCost","ModifyDate");
		}
		#endregion

 
	}
}

